# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=cppunit

pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=1.13.2
pkgrel=1
pkgdesc="A C++ unit testing framework (mingw-w64)"
arch=('any')
url="http://www.freedesktop.org/wiki/Software/cppunit"
license=("LGPL")
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config")
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs")
options=('staticlibs' 'strip')
source=("http://dev-www.libreoffice.org/src/${_realname}-${pkgver}.tar.gz")
md5sums=('d1c6bdd5a76c66d2c38331e2d287bc01')

build() {
    mkdir -p ${srcdir}/build-${MINGW_CHOST} && cd ${srcdir}/build-${MINGW_CHOST}
    ../${_realname}-${pkgver}/configure \
      --prefix=${MINGW_PREFIX} \
    --build=${MINGW_CHOST} \
      --host=${MINGW_CHOST} \
    --enable-shared \
    --disable-static
    make
}

package() {
    cd "${srcdir}/build-${MINGW_CHOST}"
    make DESTDIR="$pkgdir" install
    #rm -r "$pkgdir/usr/${_arch}/share"
}
